<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>大类资产配置模型---大类资产配置清单</title>
  <link rel="stylesheet" href="../../assets/css/layui.css" />
  <link rel="stylesheet" href="../../assets/css/main.css" />
  <script src="../../assets/js/jquery-1.11.1.min.js"></script>
  <script src="../../assets/js/layui.js"></script>
  <script src="../../assets/js/vue.min.js"></script>
</head>

<body>
  <div id="app">
    <div class="layui-card tableCard">
      <div class="title-header">配置信息</div>
      <div class="layui-form form-box pt-20" lay-filter="test">
        <div class="layui-form-item">
          <label class="layui-form-label">配置方式：</label>
          <div class="layui-input-block">
            <select id="u4754_input" lay-filter="pzfs">
              <option value="请选择">请选择</option>
              <option selected="" value="自主投资">自主投资</option>
              <option value="委外投资">委外投资</option>
            </select>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">待投资总金额：</label>
          <div class="layui-input-inline">
            <input type="text" name="je" value="1,000,000" autocomplete="off" class="layui-input layui-input-sm">
          </div>
          <div class="layui-form-mid layui-word-aux">万元</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label"></label>
          <div class="layui-input-block input-tips">提示：根据您输入的待投总金额，全部理财产品还可投非标资产<b>420,000</b>万元。</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">配置项目：</label>
          <div class="layui-input-block">
            <div class="tableBox">
              <table cellspacing="0" cellpadding="0" border="0" class="layui-table editTable">
                <thead>
                  <tr>
                    <th width="200">资产类型(大类)</th>
                    <th width="150">配置金额(万元)</th>
                    <th width="150">大类资产配置比例</th>
                    <th width="150">资产价格</th>
                    <th>提示信息</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tr v-for="(item,index) in ArrData" :key="index">
                  <td>
                    <div class="layui-unselect layui-form-select">
                      <div class="layui-select-title">
                      <input type="text"  v-model="item.clasN"  class="layui-input layui-unselect"><i class="layui-edge"></i></div>
                      <dl class="layui-anim layui-anim-upbit">
                        <dd :class="[item.AssetClass==0 ? 'layui-this' : '']" @click="setData(index,'请选择')">请选择</dd>
                        <dd :class="[item.AssetClass==1 ? 'layui-this' : '']" @click="setData(index,'非标准化债权类资产')">非标准化债权类资产</dd>
                        <dd :class="[item.AssetClass==2 ? 'layui-this' : '']" @click="setData(index,'债券')">债券</dd>
                        <dd :class="[item.AssetClass==3 ? 'layui-this' : '']" @click="setData(index,'同业存款')">同业存款</dd>
                        <dd :class="[item.AssetClass==4 ? 'layui-this' : '']" @click="setData(index,'同业存单')">同业存单</dd>
                        <dd :class="[item.AssetClass==5 ? 'layui-this' : '']" @click="setData(index,'回购')">回购</dd>
                      </dl>
                    </div>
                  </td>
                  <td>
                    <input type="text" name="'je_'+index" v-model="item.amount" autocomplete="off" class="layui-input layui-input-sm" @input="setPortion(index)">
                  </td>
                  <td>{{item.proportion}}</td>
                  <td>
                    <input type="text" name="'jep_'+index" v-model="item.price" autocomplete="off" class="layui-input layui-input-sm" @input="setPrice">
                  </td>
                  <td>
                    <div class="layui-table-cell">{{item.mark}}</div>
                  </td>
                  <td><button class="layui-btn layui-btn-normal layui-btn-xs" @click="del(index)">删除</button></td>
                </tr>
                <tr>
                  <td><span class="add_span" @click="addItem"><i class="layui-icon layui-icon-add-1"></i> 点击添加</span></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td colspan="6">
                    <p class="text-left pt-10 pb-10">{{syl_txt}}</p>
                    <p class="text-left pb-10">剩余可配置金额：{{spzje_txt}}万元</p>
                  </td>
                </tr>
              </table>
            </div>
          </div>
        </div>
        <div class="layui-form-item pt-20">
          <label class="layui-form-label"></label>
          <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal  pr-40 pl-40" @click="saveForm">保存</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
<script src="../../assets/js/modules/DLZCPZMX/KLZCPZQD.js"></script>
<script>
$(".tableBox").on("click",".layui-unselect",function(){
  $(this).toggleClass("layui-form-selected")
})
$(".tableBox").on("click",".layui-anim dd",function(){
  $(this).parent().find("dd").removeClass('layui-this');
  $(this).addClass("layui-this");
})
</script>